<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8"/>
	<title>demo</title>
	<meta name="keywords" content=""/>
	<meta name="description" content=""/>
	<meta name="viewport" content="width=device-width"/>
	<link rel="shortcut icon" href="img/touchicon.png"/>
	<link rel="stylesheet" href=""/>
	<style>
		
	</style>
</head>
<body>
	<div id="password">
	</div>
	<input type="button" value="生成密码" onclick="psd()">
	<script>
	function psd () {
		var str = 'abcdefghjkmnpqrstuvwxyz23456789#';
		var s = '';
		for (var i = 0; i<8; i++) {
			s = s + str[Math.floor(Math.random()*str.length)];
		}
		document.getElementById('password').innerHTML = s;
	}
	</script>
</body>
</html>